"""Initial(2)

Revision ID: fd13cde37d92
Revises: 03c4c4ed0c35
Create Date: 2023-12-26 12:53:04.841880

"""
import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = "fd13cde37d92"
down_revision = "03c4c4ed0c35"
branch_labels = None
depends_on = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column("user", sa.Column("referrer_id", sa.Integer(), nullable=True))
    op.create_foreign_key(
        op.f("fk_user_referrer_id_user"), "user", "user", ["referrer_id"], ["id"]
    )
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(op.f("fk_user_referrer_id_user"), "user", type_="foreignkey")
    op.drop_column("user", "referrer_id")
    # ### end Alembic commands ###
